﻿using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category9
{
  public class MT990 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagDefinition U0004;
    private static SwiftTagSubItemDefinition U0005;
    private static SwiftTagDefinition U0006;
    private static SwiftTagSubItemDefinition U0007;
    private static SwiftTagChoiceDefinition U0008;
    private static SwiftTagDefinition U000E;
    private static SwiftTagSubItemDefinition U000F;
    private static SwiftTagSubItemDefinition U0010;
    private static SwiftTagSubItemDefinition U0011;
    private static SwiftTagDefinition U0012;
    private static SwiftTagSubItemDefinition U0013;
    private static SwiftTagSubItemDefinition U0014;
    private static SwiftTagSubItemDefinition U0015;
    private static SwiftTagChoiceDefinition U0016;
    private static SwiftTagDefinition U0017;
    private static SwiftTagSubItemDefinition U0018;
    private static SwiftTagSubItemDefinition U0019;
    private static SwiftTagDefinition U001A;
    private static SwiftTagSubItemDefinition U001B;
    private static SwiftTagSubItemDefinition U001C;
    private static SwiftTagDefinition U001D;
    private static SwiftTagDefinition U001E;

    [Description("Transaction Reference Number")]
    public Tag20 TransactionReferenceNumber_20
    {
      get
      {
        return new Tag20((SwiftElement) this, 0, (SwiftDefinitionElement) MT990.U0002);
      }
    }

    [Description("Transaction Reference Number")]
    public Tag20 Tag20_TransactionReferenceNumber
    {
      get
      {
        return this.TransactionReferenceNumber_20;
      }
    }

    [Description("Related Reference")]
    public Tag21 RelatedReference_21
    {
      get
      {
        return new Tag21((SwiftElement) this, 0, (SwiftDefinitionElement) MT990.U0004);
      }
    }

    [Description("Related Reference")]
    public Tag21 Tag21_RelatedReference
    {
      get
      {
        return this.RelatedReference_21;
      }
    }

    [Description("Account Identification")]
    public Tag25 AccountIdentification_25
    {
      get
      {
        return new Tag25((SwiftElement) this, 0, (SwiftDefinitionElement) MT990.U0006);
      }
    }

    [Description("Account Identification")]
    public Tag25 Tag25_AccountIdentification
    {
      get
      {
        return this.AccountIdentification_25;
      }
    }

    [Description("Value Date, Currency Code, Amount")]
    public Tag32C DateCurrencyAmount_32C
    {
      get
      {
        return new Tag32C((SwiftElement) this, 0, (SwiftDefinitionElement) MT990.U000E);
      }
    }

    [Description("Value Date, Currency Code, Amount")]
    public Tag32C Tag32C_DateCurrencyAmount
    {
      get
      {
        return this.DateCurrencyAmount_32C;
      }
    }

    [Description("Value Date, Currency Code, Amount")]
    public Tag32D DateCurrencyAmount_32D
    {
      get
      {
        return new Tag32D((SwiftElement) this, 0, (SwiftDefinitionElement) MT990.U0012);
      }
    }

    [Description("Value Date, Currency Code, Amount")]
    public Tag32D Tag32D_DateCurrencyAmount
    {
      get
      {
        return this.DateCurrencyAmount_32D;
      }
    }

    [Description("Ordering Institution")]
    public Tag52A OrderingInstitution_52A
    {
      get
      {
        return new Tag52A((SwiftElement) this, 0, (SwiftDefinitionElement) MT990.U0017);
      }
    }

    [Description("Ordering Institution")]
    public Tag52A Tag52A_OrderingInstitution
    {
      get
      {
        return this.OrderingInstitution_52A;
      }
    }

    [Description("Ordering Institution")]
    public Tag52D OrderingInstitution_52D
    {
      get
      {
        return new Tag52D((SwiftElement) this, 0, (SwiftDefinitionElement) MT990.U001A);
      }
    }

    [Description("Ordering Institution")]
    public Tag52D Tag52D_OrderingInstitution
    {
      get
      {
        return this.OrderingInstitution_52D;
      }
    }

    [Description("Details Of Charges")]
    public Tag71B DetailsOfCharges_71B
    {
      get
      {
        return new Tag71B((SwiftElement) this, 0, (SwiftDefinitionElement) MT990.U001D);
      }
    }

    [Description("Details Of Charges")]
    public Tag71B Tag71B_DetailsOfCharges
    {
      get
      {
        return this.DetailsOfCharges_71B;
      }
    }

    [Description("Sender to Receiver Information")]
    public Tag72 SenderToReceiverInformation_72
    {
      get
      {
        return new Tag72((SwiftElement) this, 0, (SwiftDefinitionElement) MT990.U001E);
      }
    }

    [Description("Sender to Receiver Information")]
    public Tag72 Tag72_SenderToReceiverInformation
    {
      get
      {
        return this.SenderToReceiverInformation_72;
      }
    }

    public MT990()
      : base(true)
    {
    }

    public MT990(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT990.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT990.MessageDefinition = new SwiftMessageDefinition("MT990", "Advice of Charges, Interest and Other Adjustments");
      MT990.U0002 = new SwiftTagDefinition("TransactionReferenceNumber_20", "Transaction Reference Number");
      MT990.U0002.TagName = ":20:";
      MT990.U0003 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT990.U0002.Elements.Add((SwiftDefinitionElement) MT990.U0003);
      MT990.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT990.U0002);
      MT990.U0004 = new SwiftTagDefinition("RelatedReference_21", "Related Reference");
      MT990.U0004.TagName = ":21:";
      MT990.U0005 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT990.U0004.Elements.Add((SwiftDefinitionElement) MT990.U0005);
      MT990.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT990.U0004);
      MT990.U0006 = new SwiftTagDefinition("AccountIdentification_25", "Account Identification");
      MT990.U0006.TagName = ":25:";
      MT990.U0007 = new SwiftTagSubItemDefinition("Account", "Account");
      MT990.U0006.Elements.Add((SwiftDefinitionElement) MT990.U0007);
      MT990.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT990.U0006);
      MT990.U0008 = new SwiftTagChoiceDefinition("Choice", "");
      MT990.U0008.Multiple = true;
      MT990.U000E = new SwiftTagDefinition("DateCurrencyAmount_32C", "Value Date, Currency Code, Amount");
      MT990.U000E.TagName = ":32C:";
      MT990.U000F = new SwiftTagSubItemDefinition("Date", "Date");
      MT990.U000E.Elements.Add((SwiftDefinitionElement) MT990.U000F);
      MT990.U0010 = new SwiftTagSubItemDefinition("Currency", "Currency");
      MT990.U000E.Elements.Add((SwiftDefinitionElement) MT990.U0010);
      MT990.U0011 = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT990.U000E.Elements.Add((SwiftDefinitionElement) MT990.U0011);
      MT990.U0008.Elements.Add((SwiftDefinitionElement) MT990.U000E);
      MT990.U0012 = new SwiftTagDefinition("DateCurrencyAmount_32D", "Value Date, Currency Code, Amount");
      MT990.U0012.TagName = ":32D:";
      MT990.U0013 = new SwiftTagSubItemDefinition("Date", "Date");
      MT990.U0012.Elements.Add((SwiftDefinitionElement) MT990.U0013);
      MT990.U0014 = new SwiftTagSubItemDefinition("Currency", "Currency");
      MT990.U0012.Elements.Add((SwiftDefinitionElement) MT990.U0014);
      MT990.U0015 = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT990.U0012.Elements.Add((SwiftDefinitionElement) MT990.U0015);
      MT990.U0008.Elements.Add((SwiftDefinitionElement) MT990.U0012);
      MT990.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT990.U0008);
      MT990.U0016 = new SwiftTagChoiceDefinition("Choice", "");
      MT990.U0016.Mandatory = false;
      MT990.U0016.Multiple = true;
      MT990.U0017 = new SwiftTagDefinition("OrderingInstitution_52A", "Ordering Institution");
      MT990.U0017.TagName = ":52A:";
      MT990.U0018 = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT990.U0018.Mandatory = false;
      MT990.U0017.Elements.Add((SwiftDefinitionElement) MT990.U0018);
      MT990.U0019 = new SwiftTagSubItemDefinition("BankIdentifierCode", "Bank Identifier Code");
      MT990.U0017.Elements.Add((SwiftDefinitionElement) MT990.U0019);
      MT990.U0016.Elements.Add((SwiftDefinitionElement) MT990.U0017);
      MT990.U001A = new SwiftTagDefinition("OrderingInstitution_52D", "Ordering Institution");
      MT990.U001A.TagName = ":52D:";
      MT990.U001B = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT990.U001B.Mandatory = false;
      MT990.U001A.Elements.Add((SwiftDefinitionElement) MT990.U001B);
      MT990.U001C = new SwiftTagSubItemDefinition("NameAndAddress", "Name & Address");
      MT990.U001A.Elements.Add((SwiftDefinitionElement) MT990.U001C);
      MT990.U0016.Elements.Add((SwiftDefinitionElement) MT990.U001A);
      MT990.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT990.U0016);
      MT990.U001D = new SwiftTagDefinition("DetailsOfCharges_71B", "Details Of Charges");
      MT990.U001D.TagName = ":71B:";
      MT990.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT990.U001D);
      MT990.U001E = new SwiftTagDefinition("SenderToReceiverInformation_72", "Sender to Receiver Information");
      MT990.U001E.TagName = ":72:";
      MT990.U001E.Mandatory = false;
      MT990.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT990.U001E);
    }
  }
}
